import request from '@/utils/request'

const approve = {
  // 待我审批记录
  myApproveList (params) {
    return request.get('/kjrc/approve/myApproveList', {
      params
    })
  },
  // 我已审批列表
  myApprovedlist (params) {
    return request.get('/kjrc/approve/myApprovedList', {
      params
    })
  },
  getDetailData (id) {
    return request.get(`/kjrc/approve/detail/${id}`)
  },
  // 根据业务id获取该业务所有审批记录
  getByBusinessId (businessId) {
    return request.get(`/kjrc/approve/getByBusinessId/${businessId}`);
  },

  // 审批操作
  opApprove (data) {
    return request.post('/kjrc/approve/approve', data);
  },

}

export default approve;
